
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../Another/Style/jquery-ui.css"/>
<script type="text/javascript" src="../Another/JQuery/jquery1.9.2.min.js"></script>
<script type="text/javascript" src="../Another/JQuery/jquery_ui.js"></script>
<link rel="stylesheet" type="text/css" href="../Another/Style/binhluan.css"/>
<script type="text/javascript" src="../Another/JQuery/bootstrap-transition.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-alert.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-modal.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-dropdown.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-scrollspy.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-tab.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-tooltip.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-popover.js"></script>
<script type="text/javascript" src="../Another/JQuery/jquery.validate.js"></script>

<script type="text/javascript">
	  $(document).ready(function(){
			$('input').hover(function()
			{
			$(this).popover('show')
		});
			$("#registerHere").validate({
				rules:{
					NoiDung:{
						required:true,
						minlength: 6
					}
				},
				messages:{
					NoiDung:{
						required:"Nhập vào nội dung bình luận",
						minlength: "Bình luận quá ngắn!!"
					}
				},
				errorClass: "help-inline",
				errorElement: "span",
				highlight:function(element, errorClass, validClass) {
					$(element).parents('.control-group').addClass('error');
				},
				unhighlight: function(element, errorClass, validClass) {
					$(element).parents('.control-group').removeClass('error');
					$(element).parents('.control-group').addClass('success');
				}
			});
		});
</script>

<form class="form-horizontal" id="registerHere" method='post' action="../MyControl/binhluan.php?<?php echo "MaSP=".$MSP.""; ?>">
    <fieldset>
        <textarea name="NoiDung" class="input-xlarge" id="NoiDung" rel="popover" w></textarea></br>	       
        <button type="submit" class="btn-success" rel="tooltip" title="Gửi bình luận" name="BinhLuan">Bình Luận</button>
  
        <?php 
		include_once ('../MyControl/connection.php');
		$sql="Select * from binhluan 
		where MaSanPham=".$MSP."
		order by NgayBinhLuan
		LIMIT 0,2";
		$result=mysql_query($sql);
		
		while($row = mysql_fetch_array($result,MYSQL_ASSOC)){
		echo $row["NgayBinhLuan"];
		echo '</br>';
		echo $row["NoiDung"];
		echo '</br>';
		echo '</br>';
		}
		mysql_close($con);
		?>
    </fieldset>
</form>
 